package com.cn.wanxi.servlet;

import com.cn.wanxi.model.CompanyModel;
import com.cn.wanxi.model.NavModel;
import com.cn.wanxi.service.CompanyService;
import com.cn.wanxi.service.NavService;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public class CompanyAndNavServlet {

    public static void getCompanyAndNavData(HttpServletRequest req) {
        CompanyService companyService = new CompanyService();
        CompanyModel companyModel = companyService.getCompanyModel();
        req.setAttribute("companyModel", companyModel);

        NavService navService = new NavService();
        List<NavModel> navModelList = navService.getNavModelList();
        req.setAttribute("navModelList", navModelList);
    }
}
